#include <iostream>
#include <cmath>
using namespace std;
using ll=long long;
bool check(ll num){
	
	if(num<2){
		return false;
	}
	for(ll i=2;i<=sqrt(num);++i){
		if(num%i==0){
			return false;
		}
	}
	return true;
}
int main() {

	string str;
	cin>>str;
	ll llNum=0;
	int n=static_cast<int>(str.size());
	for(int i=0;i<n;++i){
		llNum=llNum*10+(str[i]-'0');
	}
	for(int i=n-2;i>=0;--i){
		llNum=llNum*10+(str[i]-'0');
	}
	if(check(llNum)){
		cout<<"prime"<<endl;
	}
	else{
		cout<<"noprime"<<endl;
	}
}
